import { ItemData } from "../../../resource/info/ItemData";
import { EBind } from "../../../../../Message/Public/EBind";
type int = number;
//class SmeltMaterialItemData
    
    export  class SmeltMaterialItemData
    {
        constructor(arg1: int)
        {
            
            var loc1=new ItemData(arg1);
            if (loc1.itemInfo.item.bind != EBind._EBindYes) 
            {
                this.itemUnBindCode = arg1;
                this._itemUnBind = loc1;
            }
            else 
            {
                this.itemBindCode = arg1;
                this._itemBind = loc1;
                if (loc1.itemInfo.item.codeUnbind == 0) 
                {
                    this.itemUnBindCode = arg1;
                }
                else 
                {
                    this.itemUnBindCode = loc1.itemInfo.item.codeUnbind;
                }
            }
            return;
        }

        public get itemBind(): ItemData
        {
            if (this._itemBind == null) 
            {
                this._itemBind = new ItemData(this.itemBindCode);
            }
            return this._itemBind;
        }

        public get itemUnBind(): ItemData
        {
            if (this._itemUnBind == null) 
            {
                this._itemUnBind = new ItemData(this.itemUnBindCode);
            }
            return this._itemUnBind;
        }

        public /* var */itemBindCode: int=0;

        /* internal */ /* var */_itemBind: ItemData;

        public /* var */itemUnBindCode: int=0;

        /* internal */ /* var */_itemUnBind: ItemData;

        public /* var */itemAmountNeeded: int;

        public /* var */itemAmountOwn: int;
    }
